 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 <%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>S6办公系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
function check(){
	var name =document.getElementById("name").value.toLowerCase();
	if(name==""){
		alert('机构名称不能为空');
		 return false;
		}
		var shortname =document.getElementById("shortname").value.toLowerCase();
	if(shortname==""){
		alert('机构描述不能为空');
		 return false;
		}
 return true;
	}
</script>
  </head>

<body style="background-color:#D6D3C9">
<form action="branchinfoadd.action"  method="post" onsubmit="return check()">
<table width="40%" border="0">
  <tr>
    <td colspan="3"  style="text-align:center;"><h3>机构管理</h3></td>
  </tr>
  <tr>
    <td width="278">机构名称</td>
    <td width="274"><input type="text" name="branchinfo.name" id="name"/></td>
  </tr>
  <tr>
  <td>机构描述</td>
   <td><s:textarea name="branchinfo.shortname" id="shortname" rows="5" cols="40"></s:textarea></td>
  </tr>
  <tr align="center">
  <td colspan="2"><input type="submit" value="添加"/></td>
  </tr>
</table>
</form>
<hr>
<table width="60%" border="0">
  <tr>
    <td>机构名称</td>
    <td>机构简称</td>
    <td>操作</td>
  </tr>
  <s:iterator value="list_branch">
  	 <tr>
    <td><s:property value="name"/></td>
    <td><s:property value="shortname"/></td>
    <td><input type="image" src="web/web/images/delete.gif" onclick="location.href='branchinfodel.action?bid=<s:property value='id'/>'" />${session.mesage}</td>
  </tr> 
  </s:iterator>

</table>


</body>
</html>